package com.didispace.impl;

import com.didispace.service.AddCaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import static org.testng.Assert.assertEquals;

/*
result 入参出参报文写入到结果中

红冲发票代码号码获取  缓存

检查点自定义 
*/
//@SpringBootTest(classes = { AddCaseimpl.class })
//@TestExecutionListeners(listeners = MockitoTestExecutionListener.class)



public class ReportTest2{
	@Autowired(required=true)
	private AddCaseService addCaseService;
	
	
	@DataProvider(name = "createData")
    public Iterator<Object[]> createData(){
        List<Object[]> dataProvider = new ArrayList<Object[]>();
        for (int i=0;i<2;i++){
            String[] s = {String.format("this is one",i)};
            dataProvider.add(s);
        }
        return  dataProvider.iterator();
    }
//
//    @Test(dataProvider = "createData")
//    public void dataProviderTest(String s){
//        //输出log会在报告中提现
//        Reporter.log("get parameter："+s,true);
//        Assert.assertTrue(s.length()>2," yes ? or no?");
//    }
//
//    @Test
//    public void testTrue() {
//        Assert.assertTrue(true,"success!");
//    }
//
//    @Test
//    public void testFail() {
//        Assert.fail("false!");
//    }
    @Test
    public void addCase() {
    	boolean b=addCaseService.SaveCase("asdasd", "dqwdqwdwqd", "qwdqwdqwd", "qwdwdqdqwd", "qwdqwdqwd","'");
    	assertEquals(b, true);
    } 
    
    
    
    
    
    
}
